import sdk from "../..";
import base_component from "../../../component/base_component";
import rpg_component from "../../../component/rpg_component";
import { ComType } from "../../tool/component";
import { IBodyCreateConfig } from "../types";
import { BaseBody } from "./body_base";
export default class pet extends BaseBody {
    constructor(){
        super();
        this.id = 'P' + sdk.counter.get('pet');
    }
    create(config: IBodyCreateConfig) {
        let con_base = this.getComponent(ComType.base) as base_component;
        con_base.nickName = config.name;
        con_base.emoji = config.emoji;
        con_base.show = config.url;
        let con_rpg = this.getComponent(ComType.rpg) as rpg_component;
        con_rpg.config_setUp(config);
    }
}